<?php
class Staticizer_Index_Member_Dockyard extends Staticizer
{
    public function Build($params=NULL)
    {
        #拼凑SQL语句
        $sql='select ID,CompanyName from Account where ';
        {
            $sql.="FIND_IN_SET('".DAO_Trade::DOCKYARD."',Trade) or ";
            $sql.="FIND_IN_SET('".DAO_Trade::SCRAPPING_YARD."',Trade) or ";
            $sql.="FIND_IN_SET('".DAO_Trade::REPAIRING_YARD."',Trade)";
        }
        $sql.='order by DateTime desc limit 0,8';
        
        #模板渲染
        View::Assign('Dockyards',DB::GetRows($sql));

        #生成静态
        $this->Save('index/member.dockyard.html',View::Fetch('index/member.dockyard.tpl'));
    }
}
?>
